﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CardID
{
    public partial class endControl : UserControl
    {
        public endControl()
        {
            InitializeComponent();
        }

        private void homeBT_Click(object sender, EventArgs e)
        {
            changeControlTo("startControl");
        }
        public void changeControlTo(string nextNameControl)
        {
            this.Visible = false;
            this.Enabled = false;
            Control[] list = this.Parent.Controls.Find(nextNameControl, true);
            Control result = null;
        

            if (list.Length != 0)
            {
                result = list[0];
                result.Visible = true;
                result.Enabled = true;
            }
        }
    }
}
